namespace Digitalmes.Domain.Entities.Sys;

/// <summary>
/// 系统字典表
/// </summary>
[SugarTable("sys_dict")]
public sealed class SysDict : AuditedEntity
{
    /// <summary>
    /// 字典名称 
    /// </summary>
    [NotNull]
    public string? Name { get; set; }

    /// <summary>
    /// 字典编号（设定后不能修改）
    /// </summary>
    [NotNull]
    public string? Code { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Order { get; set; }

    /// <summary>
    /// 启用状态（0->停用，1->启用）
    /// </summary>
    public EnabledStatusEnum Status { get; set; }

    /// <summary>
    /// 字典项集合。
    /// </summary>
    [Navigate(NavigateType.OneToMany, nameof(SysDictItem.DictId))]
    public List<SysDictItem>? Items { get; set; }
}
